﻿namespace GoogleMusicDesktop
{
    using System;
    using System.IO;

    internal class IoHelper
    {
        public static bool CreateMultiFolder(string folderName)
        {
            bool flag;
            try
            {
                if (Directory.Exists(folderName))
                {
                    return true;
                }
                string directoryName = Path.GetDirectoryName(folderName);
                if (!Directory.Exists(directoryName) && !CreateMultiFolder(directoryName))
                {
                    return false;
                }
                Directory.CreateDirectory(folderName);
                flag = true;
            }
            catch
            {
                throw;
            }
            return flag;
        }
    }
}

